package com.kai.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by zhangkai on 2018/8/13.
 */
@Component
@ConfigurationProperties(prefix = "spring.redis")
public class RedisProperties {

    private int    expireSeconds;

   // @Value("${spring.redis.cluster.nodes}")
    private String clusterNodes;

    //@Value("${spring.redis.password}")
    private String password;

  //  @Value("${spring.redis.timeout}")
    private int    commandTimeout;


    public int getExpireSeconds() {
        return expireSeconds;
    }

    public void setExpireSeconds(int expireSeconds) {
        this.expireSeconds = expireSeconds;
    }

    public String getClusterNodes() {
        return clusterNodes;
    }

    public void setClusterNodes(String clusterNodes) {
        this.clusterNodes = clusterNodes;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getCommandTimeout() {
        return commandTimeout;
    }

    public void setCommandTimeout(int commandTimeout) {
        this.commandTimeout = commandTimeout;
    }
}
